<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<c:import url="/view/admin/include/header/adminHeader.jsp"></c:import>
    <!-- 컨텐츠 부분 -->
	<div id="container">
    	<!-- 왼쪽 메뉴 부분 -->
    	<c:import url="/view/admin/include/left/adminLeft.jsp"></c:import>
        <!-- 왼쪽 메뉴 부분 -->
        <!-- 오른쪽 내용 부분 -->
        <dl>
        	<dd class="path">
        		홈 > 회원 관리 > <span class="path_b">팀장 회원</span>
        	</dd>
        </dl>
        <dl class="board_top">
	            <dd class="result_num f_orange">검색결과  : 총 ${memberBean.totalCount}건</dd>
	        </dl>	           
        <dl class="content">          
            <dd class="">
            	<table cellspacing="0" cellpadding="0" summary="" >
                	<caption></caption>
                    	 <colgroup>
							<col width="8%;"/>
							<col width="8%;"/>
							<col width="15%;"/>
							<col width="22%;"/>
							<col width="32%;"/>
							<col width="15%;"/>
                         </colgroup>
                    <thead>
                    	<tr>
	                       	<th scope="col" class="table_th_bottom">구분</th>
	                       	<th scope="col" class="table_th_bottom">번호</th>
	                        <th scope="col" class="table_th_bottom">이름</th>
	                        <th scope="col" class="table_th_bottom">직급</th>
	                        <th scope="col" class="table_th_bottom">부서</th>
	                        <th scope="col" class="table_th_bottom">사번</th>
                        </tr>
                    </thead>
                    <tbody>
                    	<s:if test="%{1 > list.size()}">
                    	<tr>
                    		<td colspan="4">게시물이 없습니다.</td>
                    	<tr>
                    	</s:if>
                    	<s:iterator value="list" status="i">
						<tr>
							<td><input type="radio" class="radio" name="leader_seq" value="${leader_seq }" /></td>
							<td><s:property value="memberBean.totalCount - #i.count+1" /></td>
							<td>${mem_name }</td>
							<td>${mem_position }</td>
							<td>${mem_dept }</td>
							<td>${mem_no }</td>
						</tr>
						</s:iterator>
                    </tbody>
                 </table>
            </dd>
        </dl>
        <dl class="paginate">  	
            <dd class="btn_right">
            	<input type="button" value="쓰기" class="input_btn_s b" id="btn_reg" />
            	<input type="button" value="수정" class="input_btn_s b" id="btn_modify" />
            	<input type="button" value="삭제" class="input_btn_s b" id="btn_delete" />
            </dd>
         </dl>
        <!-- 오른쪽 내용 부분 -->
    </div>
    <!-- 컨텐츠 부분 -->   
<c:import url="/view/admin/include/footer/adminFooter.jsp"></c:import>
<script type="text/javascript">
	$().ready(function(){
	
	$("#btn_reg").click(function(){
		location.href="/admin/leaderRegForm.hcom";
	});
		
	$("#btn_modify").click(function(){
		if($("input[name=leader_seq]:checked").val() != null){
			location.href = "/admin/leaderModifyForm.hcom?leader_seq="+$("input[name=leader_seq]:checked").val();
		}else{
			alert("회원을 선택해 주십시오.");
		}
	});
	
	$("#btn_delete").click(function(){
		if($("input[name=leader_seq]:checked").val() != null){
			if(confirm("삭제하시겠습니까?")){
				location.href="/admin/deleteLeader.hcom?leader_seq="+$("input[name=leader_seq]:checked").val();
			}
		}else{
			alert("회원을 선택해 주십시오.");
		}
	});
	
	function searchValidate(){
		if($("#search_value").val() == ""){
			alert("검색할 값을 넣어 주세요");
			$("#search_value").focus();
			return false;
		}
		return true;
	}
	});
</script>
